package com.example.feignapi.wemedia;

import com.example.common.util.R;
import com.example.model.wemedia.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-wemedia", path = "/api/v1/")
public interface WemediaClient {
    @GetMapping("/user/findByName/{userName}")
    User getUserByUserName(@PathVariable(value = "userName") String userName);

    @PostMapping("/user/addUser")
    R saveUser(@RequestBody User user);

    @GetMapping(value = "/channel/getAllChannel")
    R getAllChannel();
}
